<?php
/**
 * 操作记录
 * @author fanzhanao
 *
 */
class index_controller_log extends Controller{
	public function __construct($app, $controller){
		parent::__construct($app, $controller);
		$this->data = Model::factory('index_model_log');
	}
	/**
	 * 添加log
	 *
	 */
	public function log_action(){
		$this->requireLogin();
//		if(!self::$login['uid']) return -2;
		$this->_renderJson();
		$args['uid']	=	self::$login['uid'];
		$args['cartoon_id']	=	_('cid');
		$args['act_type']	=	_('type');
		if($rs = Model::factory('index_model_log')->add($args)){
			$this->ret = self::success($rs);
		}else{
			$this->ret = self::failure('操作失败');
		}
	}
}